
unset PATH

MKDIR=${1}
ECHO=${2}
PORTMAP=${3}
CLIENT_NAME=${4}
CLIENT_COMPUTER=${5}
EXPORTS=${6}
SNAPSHOT_BASE=${7}

SNAPSHOT_DIRECTORY=${SNAPSHOT_BASE}/${CLIENT_NAME}

${USERADD} ${CLIENT_NAME}
${MKDIR} --parents ${SNAPSHOT_DIRECTORY}
${ECHO} ${SNAPSHOT_DIRECTORY} $CLIENT_COMPUTER(secure,ro,no_root_squash) > ${EXPORTS}
${PORTMAP} restart
